package com.xmy.cultivate.service.impl;

import com.xmy.cultivate.entity.StudentSignIn;
import com.xmy.cultivate.entity.StudentSignInTemp;
import com.xmy.cultivate.mapper.StudentSignInTempMapper;
import com.xmy.cultivate.service.IStudentSignInTempService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 刷脸签到临时数据，为了数据过多不影响判断，定时删除 服务实现类
 * </p>
 *
 * @author min
 * @since 2023-02-02
 */
@Service
public class StudentSignInTempServiceImpl extends ServiceImpl<StudentSignInTempMapper, StudentSignInTemp> implements IStudentSignInTempService {

    @Autowired
    StudentSignInTempMapper studentSignInTempMapper;

    @Override
    public boolean saveOrUpdateDataCustom(StudentSignIn studentSignIn){
        StudentSignInTemp studentSignInTemp = new StudentSignInTemp();
        BeanUtils.copyProperties(studentSignIn,studentSignInTemp);
        this.saveOrUpdate(studentSignInTemp);
        return true;
    }
}
